package org.example.slave.packet;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.SneakyThrows;

import java.io.ByteArrayOutputStream;

/**
 * @author dingrui
 * @since 2022/2/15
 * @description
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class AuthSwitchResponsePacket extends CommandPacket{

    private byte[] authData;

    @Override
    @SneakyThrows
    public byte[] toBytes() {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        out.write(authData);
        return out.toByteArray();
    }
}
